package com.market.controller.admin;

import com.market.bean.MarketAddress;
import com.market.bean.common.BasePageInfo;
import com.market.bean.common.BaseRespVo;
import com.market.bean.common.CommonData;
import com.market.service.admin.AdminAddressService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author tan
 * @date 2022年12月29日 14:09
 */
@RestController
@RequestMapping("admin/address")
public class AdminAddressController {
    @Autowired
    AdminAddressService addressService;

    @RequestMapping("list")
    public BaseRespVo<CommonData> list(BasePageInfo info, String name, Integer userId) {
        CommonData<MarketAddress> data = addressService.list(info, name, userId);
        return BaseRespVo.ok(data);
    }
}


